package cn.com.gof.structure.flyweight;

/**
 * <p>Title: Client</p>  
 * <p>Description: </p>  
 * @author WangJun
 * @date 2018年9月7日 下午2:35:05
 */
public class Client {
	public static void main(String[] args) {
		ChessFlyWeight chess1 = ChessFlyWeightFactory.getChess("黑色");
		ChessFlyWeight chess2 = ChessFlyWeightFactory.getChess("黑色");
		
		System.out.println(chess1);
		System.out.println(chess2);
		System.out.println("--------------------增加外部状态-----------------");
		chess2.display(new Coordinate(10, 10));
		chess1.display(new Coordinate(20, 10));
	}
}
